import React from "react";
import { useRoutes } from 'react-router-dom'
import {routes} from './routes'

function App() {

  //Navigate组件：里面有个to属性 可以改变重新执行路由跳转

  return (
    useRoutes(routes)
    // <Routes>
    //   <Route path="/login" element={<Login />} />
    //   <Route path="/main" element={<Main />}>
    //     <Route path="/main/home" element={<Home />} />
    //     <Route  path="/main/about" element={<About />} />
    //   </Route>
    //   <Route path="/" element={<Navigate to="/login" />} />
    //   <Route path="*" element={<NotFind />} />
    // </Routes>

  )
}

export default App;





